<?php
namespace Home\Controller;

class DetailsController extends AdminController
{
	private $_model = null; //数据库操作类
	//初始化操作
	public function _initialize(){
		$this->_model = D('Book');
	}
	public function index(){
		$id=$_GET['id'];		
		$list = $this->_model->where("id=$id")->find();

		$user=D('User')->where(array('id'=>array('eq',$list['uid'])))->find();
		$type=D('Type')->where(array('id'=>array('eq',$list['typeid'])))->find();

		// var_dump($type);exit;
		$this->assign("list",$list);
		$this->assign("user",$user);
		$this->assign("type",$type);
		$this->display();
	}



}
